using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Flan.Controls;

public partial class _02_HelloWorld_With_Close_Button : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
        ScriptManager sc = ScriptManager.GetCurrent(this);
        
        sc.RegisterAsyncPostBackControl(Button1);
        sc.RegisterAsyncPostBackControl(Button2);

        UpdatePanelPopupExtender.RegisterCloseControl(divClose, UpdatePanel1);
        UpdatePanelPopupExtender.RegisterCloseControl(spnClose, UpdatePanel1);

        Label1.Text = "Hello World from the server! The time is " + DateTime.Now.ToLongTimeString();
    }
    protected void Button1_Click(object sender, EventArgs e) {
        UpdatePanel1.Update();
        UpdatePanelPopupExtender1.ShowAt(Button1);
    }
    protected void Button2_Click(object sender, EventArgs e) {
        UpdatePanel1.Update();
        UpdatePanelPopupExtender1.ShowAt(Button2);
    }
}
